<php>if(empty($stype))$stype	= 'sale';
$map['brandid'] = $brandid;
$map['stype'] 	= $stype;
$searchResult 	= service('Product')->search4User($map,20);
</php>
<script>
var _stype = '{$stype}';
var _currentbrandid = '{$brandid}';
$(document).ready(function(){
	k_initcollectionbtn();
});
function goPage(pno){
	$.kajax({      
		url:"{:U('plugin://gift/ajxgoods')}",      
		type:'post', //数据发送方式  
		data:{brandid:_currentbrandid,stype:_stype,pno:pno} ,    
		async: false ,//同步方式     
		success: function(html){ 
			$('#ajx_show_area').html(html);
		}
	});
}
</script>		

		<div class="list_title">
		<div>排序：</div>
			<dl class="sel_opt">
				<dt> 
					<span onclick="_stype='sale';goPage(1);" 	class="bynew <php>if($stype=='sale'){</php>sorted<php>}</php>" title="销量：从高到低" >畅销</span>
					<span onclick="_stype='new';goPage(1);" 	class="bynew <php>if($stype=='new'){</php>sorted<php>}</php>" title="按时间排序" 	>最新</span> 
					<span onclick="_stype='down';goPage(1);" 	class="byup <php>if($stype=='down'){</php>sorted<php>}</php>" title="价格：由高到低" >价格由高到低</span> 
					<span onclick="_stype='up';	goPage(1);" 	class="byup <php>if($stype=='up'){</php>sorted<php>}</php>" title="价格：由低到高" >价格由低到高</span>
				</dt>
				<dd><span>{$searchResult['nowPage']}/{$searchResult['totalPages']} 页</span>
		        	<span class="prep" 
		        			<php>if($searchResult['nowPage']>1){
		        					echo "onclick='javascript:goPage(".($searchResult['nowPage']-1).")'";
		        				 }</php> >&nbsp;</span>
		        	<span class="nextp">
		        		<a href="javascript:void(0)" 
		        			<php>if($searchResult['nowPage']<$searchResult['totalPages']){
		        				 	echo "onclick='javascript:goPage(".($searchResult['nowPage']+1).")'";
		        				 }</php>
		        		>下一页</a></span>
		       	</dd>
			</dl>
		</div>
		<div style="padding:0px 0px 0px 3px;">
			<div class="info_list_container" id="info_list_container">
				<ul style="display: block;width: auto;" class="info_list" id="info_list">
				
				<volist id="vo" name="searchResult['data']">
				<li>
					<div class="gift_info" id="gift_info" rel="{$vo['partner_id']}" title="{$vo['goods_title']}  价格： {:formatMoney($vo['shelf_out_price'])}">
						<php>if($vo['goods_get_type']=='delivery'||$vo['goods_get_type']=='all'){</php><em class="peisong"><img src="__PUBLIC__/Images/global/icon_peisong.gif"></em><php>}</php>
				       	<a href="{:U('plugin://gift/show',array('shelfid'=>$vo['shelf_id']))}">
				       	<img width="80" height="80" alt="{$vo['goods_title']}" 
				       		src="{:getPhotoFromThumb($vo['goods_icon'],80,80)}"></a>
				       	<a href="{:U('plugin://gift/show',array('shelfid'=>$vo['shelf_id']))}">
				       		<p style="line-height:25px;height: 25px;overflow: hidden;">{$vo['goods_title']}</p></a>
				        {:formatMoney($vo['shelf_out_price'])}
				    </div>
				</li>
				</volist>
				
				</ul>
		    </div>
			<div id="clear"></div>
			<div class="page_box">{$searchResult['html']}</div>
		</div>
		
		
		<div id="clear"></div>
		
		